package com.bdqn.bookshop.controller.admin;

import com.bdqn.bookshop.entity.MallUser;
import com.bdqn.bookshop.service.MallUserService;
import com.bdqn.bookshop.utils.DataGridViewResult;
import com.bdqn.bookshop.utils.Result;
import com.bdqn.bookshop.vo.MallUserVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;

/**
 * @author : 罗若然[LUO_RUO_RAN]
 * @date : 2020-07-29 16:16
 **/
@RestController
@RequestMapping("/admin/mallUser")
public class AdminMallUserController {

    @Autowired
    private MallUserService mallUserService;

    @RequestMapping("/mallUserList")
    public DataGridViewResult mallUserList(MallUserVo mallUserVo){
        return mallUserService.mallUserList(mallUserVo);
    }

    @RequestMapping("/batchLocked{bool}")
    public Result batchLocked(String ids, @PathVariable String bool){
        return mallUserService.batchLocked(ids,bool);
    }

    @RequestMapping("/editById")
    public Result editById(MallUser mallUser){
        return mallUserService.editById(mallUser);
    }
}
